import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  server: {
    proxy: {
      '/api': {
        target: 'https://asimplefox.com',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/api/, '') // 保留 /api
      },
      '^/(srt|taskapi)': {
        target: 'http://47.82.102.105:8000',
        changeOrigin: true,
        rewrite: path => path.replace(/^\/(srt|taskapi)/, '')
      }
    }
  }
})

